<?php
$xmlstring= '<?xml version="1.0" encoding="UTF-8"?>
   <students>
      <student>
        <name>Hearaman</name>
        <age>24</age>
        <email>hearaman.dev@gmail.com</email>
        <address>Bangalore, India</address>
     </student>
 </students>';

$xml = simplexml_load_string( $xmlstring );

echo "Parent Tag = ". $xml->getName() . "<br />";

foreach($xml->children()->children() as $child)
{
    echo $child->getName() . ": " . $child . "<br />";
}
